#******************************************************************************
# Makefile.am (xpchello/src)
#------------------------------------------------------------------------------
##
# \file          	Makefile.am
# \library       	hello
# \author        	Chris Ahlstrom
# \date         	2008-05-09
# \update      	2013-10-05
# \version       	$Revision$
# \license       	$XPC_SUITE_GPL_LICENSE$
#
#    	This makefile provides the skeleton needed to build the hello
#    	applications using GNU autotools.
#
# \references
#       -   http://olympus.het.brown.edu/cgi-bin/info2www?(gettext)src/Makefile
#
#------------------------------------------------------------------------------

AUTOMAKE_OPTIONS = foreign dist-zip dist-bzip2
MAINTAINERCLEANFILES = Makefile.in Makefile $(AUX_DIST)

#*****************************************************************************
# CLEANFILES includes stuff generated by the coverage/profiling options.
#-----------------------------------------------------------------------------

CLEANFILES = *.gc*

#******************************************************************************
# 	EXTRA_DIST
#------------------------------------------------------------------------------

EXTRA_DIST =

#*****************************************************************************
# Import version macros from configure.ac
#-----------------------------------------------------------------------------

PACKAGE = @PACKAGE@
VERSION = @VERSION@

XPC_API_MAJOR = @XPC_API_MAJOR@
XPC_API_MINOR = @XPC_API_MINOR@
XPC_API_PATCH = @XPC_API_PATCH@
XPC_API_VERSION = @XPC_API_VERSION@

XPC_LT_CURRENT = @XPC_LT_CURRENT@
XPC_LT_REVISION = @XPC_LT_REVISION@
XPC_LT_AGE = @XPC_LT_AGE@

#******************************************************************************
# Install directories
#------------------------------------------------------------------------------
#
# 		This define is necessary to cause the proper subdirectory to be made
# 		during installation.  'xpclibdir' is defined in the configure.ac
# 		script.
#
# 		However, apparently does not work with libtool.  See 'libdir' below
# 		instead.
#
# 				pkglibdir=$(xpclibdir)
#
#------------------------------------------------------------------------------

prefix = @prefix@
libdir = @xpclibdir@
datadir = @datadir@
datarootdir = @datarootdir@
helloincludedir = @helloincludedir@
xpcdocdir = @xpcdocdir@
xpcdoxygendir = @xpcdoxygendir@
xpclibdir = @xpclibdir@
xpcincludedir = @xpcincludedir@

localedir = $(datadir)/locale
DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@

#******************************************************************************
# Local directory
#------------------------------------------------------------------------------

top_srcdir = @top_srcdir@

#******************************************************************************
# AM_CPPFLAGS [formerly "INCLUDES"]
#------------------------------------------------------------------------------
#
#     Defines where to look for header files.  If we build from the
#     xpc_suite root directory, then $top_srcdir is "../.."; if we build
#     from the hello directory, then it is "..".
#
#     "../include" is where the hello header files are located, and it must
#     be defined even if $top_srcdir is "../..".  So we need two entries,
#     to handle the two possible build situations.
#
#     (There's actually a third situation, where we enter a directory such
#     as "debug", and do "../configure" We had to add ../../include to make
#     it work. $(top_srcdir)/include should have worked, but automake
#     appended "/xpc" to it!)
#
#------------------------------------------------------------------------------

AM_CPPFLAGS = \
 -I$(top_srcdir)/include \
 -I$(top_srcdir)/xpccut/include \
 -I$(top_srcdir)/xpchello/include \
 -I../../include

#******************************************************************************
# Building the library
#------------------------------------------------------------------------------
#
#     Libraries can also be added as:
#
#          LIBS = @LIBINTL@ @LIBS@
#
#     If libtool support is being used, use @LTLIBINTL.
#
# hello_LDADD = @LIBINTL@ ../gnulib/lib/libgnu.a
# AM_CPPFLAGS = -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib
#
# <module>_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
# AM_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\"
#
#------------------------------------------------------------------------------

bin_PROGRAMS = hello bad-pointers core-dumps setjump

hello_SOURCES = hello-main.c
hello_LDADD = @LIBINTL@

bad_pointers_SOURCES = bad-pointers.c

core_dumps_SOURCES = core-dumps.c

setjump_SOURCES = setjmp_exceptions.c

#******************************************************************************
# Makefile.am (xpchello/src)
#------------------------------------------------------------------------------
# Local Variables:
# End:
#------------------------------------------------------------------------------
# vim: ts=3 sw=3 noet ft=automake
#------------------------------------------------------------------------------
